package cn.chinaunicom.sdsi.activiti.example.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import cn.chinaunicom.sdsi.activiti.example.entity.Leave;
import cn.chinaunicom.sdsi.activiti.example.service.LeaveService;

@RestController
public class LeaveController {

	@Autowired
	private LeaveService leaveService;
	
	@PostMapping(value="saveLeave")
	public void saveLeave(@RequestBody Leave leave, @RequestParam String processDefinitionKey) {
		leaveService.save(leave, processDefinitionKey);
	}
	
	
}
